added algorithm include to gamepad.h and updated CMakeList file for cross platform compatibility