fixed older CMake versions using PATH instead of DIRECTORY in get_filename_component()