Supports ENABLE_NET build flag.
Merge #410 r=@kevinmehall: Supports ENABLE_NET build flag.