Added cross compilation to CMake build system.

Brings it more into line with make based system. I've tested on 32- and 64-bit
Windows, but not yet Linux.