If it's missing, MediaBox wouldn't know it's running on Diablo. The question however is, how can it be missing as I think it comes with the OS? Did you install something unusual or removed system packages?
import hildon Window = hildon.Window if hasattr(Window,'set_app_menu'): ui_environment['platform'] = 'maemo5' else: ui_environment['platform'] = 'maemo4'