Pr configure fixes for visual studio

Various fixes to make cmake to pass successfully on with -G "Visual Studio 12" generator. Also fixed one test case linking problem with poclu when compiling on Ubuntu with self compiled llvm 3.5.
custom_try_run_lli fails on ARM-linux (IIRC). Please make this check conditional. 
Not sure how lli works on MIPS ( @dsandersimgtec ?) - perhaps best make it conditional on ```WIN32```?