Minor fixes here for GCC thread with openni and glfw termination