Add code for windows to correctly identify compiler

This is based on a patch proposed by aero, and hopefull this
fixes #1.