getopt exposed via sp_sock

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>