libdll: AmigaOS 4 support
Added a lightweight pthreads subset