Set socket options before binding. (#427 again)