updated with latest monogame upstream