Assorted fixes for building under VS2012