Fixed a few bugs in mdmwebkit and call mdm_ready() to let themes know when MDM is ready