perform runtime and module initialization when loading DSOs

depends on #587 and #589