Change pragma order in headers and fix gcc4.9 compiler warnings.
Fixes for MSVC error C2797.
Merge branch 'develop'