LM4OPT: Unveiling the Potential of Large Language Models in Formulating Mathematical Optimization Problems