compile fixes for vs2010