Clone adonais's libportable module