AIX Fixes

These were the changes I made in order to get things working on AIX.