hlib: split out wscript into wscript and cmt-compat