Add support for WordPress 3.5+ media modal.

This adds support for the 3.5+ media modal for selecting images.

Any feedback welcome.

Would be great if support for this could be added to the main plugin on WP.org