Constructing Entanglement Witnesses for Infinite-Dimensional Systems