Added thread emulation to fix WP8 build