backport resthub fixes for IE7/8