Dynaloader: use PREINIT to avoid compiler errors

A recent change to the typmap definitions makes a var declaration
generate code. Move this declaration from CODE: to PREINIT: to avoid a
'Mixed declarations' compiler error.

This was spotted in dl_hpux.xs by bulk88, which I've blindly fixed.
From visual inspection there were also declarations in dl_vms.xs
that needed moving (although in that case it dosen't trigger the typemap
code emission).