copy parts of Modernizr to create an correctly working support3d

This is just a demo of how it could look like, but it's a mess that should
not be merged imho. Modernizr does it's job pretty good - so I'd just use it.