Tested and works on NetBSD.
