Windows Phone 8 compilation fixes