Fixing compilation on portable and windows8 targets