Compilation fixes.

Partially fixed WinPhone8 compilation, completely fixed Win8.1
compilation.