Use get_filename_component(PATH) instead of get_filename_component(DIRECTORY)

get_filename_component(DIRECTORY) is available only on CMake 2.8.12 or later