Restore plugin support via some ugly hacks.