Navigating the Labyrinth: Evaluating and Enhancing LLMs' Ability to Reason About Search Problems