merged updated win32 port by Larry Adams and the cacti team