Added AmigaOS4 support and made it work on AmigaOS 3.x with current sources.