Some CMake fixes for static linking on Windows from the OpenFL project.

--HG--
extra : rebase_source : d913d06e39a873fa6da7814786f1acf49e541c7f
Move to no-argument version of "endif()" in CMakeLists.txt.

--HG--
extra : rebase_source : 92449842241a87a56281cbffbbdece5a882ed11d