CMakeLists.txt: fix LINK_DIRECTORIES statement

must be moved up to work