z80-as: Clean up valgrind errors

Also some fixes to allow to compile on Linux