Fix memory detection on FreeBSD

Hi, 

I have fixed an available memory detection on FreeBSD systems. Tested on FreeBSD 5.x and 9.x.