Fixes to WP8/WinRT support