Fix custom CMAKE_INSTALL_PREFIX logic