Fixed mac/unix linking problems