Made code compile with vs2012