Set the BUILD environment variable properly when building with MinGW implementations that lack a Unix shell (TDM-GCC, for instance);  Only set CMP0022 if it is supported (older CMake implementations don't support it);  Remove trailing spaces


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1237 632fc199-4ca6-4c93-a231-07263d6284db