I also have to include
'if( ! class_exists('WP_Screen') ) {
require_once( ABSPATH . 'wp-admin/includes/screen.php' );
}'
in order for that to happen. Otherwise I just get:
Notice: convert_to_screen(), add_meta_box() was called incorrectly. Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /Users/artichokes/Desktop/wordpress/wp-includes/functions.php on line 2944