Added partial support for XNA threading.