Fix windows cmake build

Don't link libm for MSVC
Merge pull request #10 from chrihartl/fix_windows_cmake_build

Fix windows cmake build
Change SOVERSION only in case of ABI changes
Fix indentation and line endings
Always free resources before setting the error code

In case of error calls to function that free resources could
modify the error code shadowing errors.
Do not shadow the original error message that appears to be more informative
typo
Fixed a mirroring problem in epr_read_band_annotation_data