Moved all typedefs to types.h header to work in older compilers. Switched to requiring cmake 2.6