Fix test_openjpeg on Mac

This change fixes test_openjpeg on my Mac (and to note, it seems this cmake toolchain generation code is only used by test_openjpeg).

The issue is that get_shared_library_name maps the expected library output for build_library from `libopenjpeg.so.1.4.0` to `libopenjpeg.1.4.0.dylib`, but because CMAKE_SYSTEM_NAME is set to Linux the shared object is generated with the .so extension on the Mac still.

From looking at:
http://www.cmake.org/Wiki/CMake_Cross_Compiling
and
http://docs.python.org/2/library/platform.html
it appears the output of platform.system() is compatible with what CMake expects for CMAKE_SYSTEM_NAME.