Use fread() when serving http files

This change allows compilation on platforms without read().