added conditional compilation for WP8 and win8