Support building as libshadowsocks

Useful for some GUI clients (i.e. Windows, OS X, iOS)
https://github.com/librehat/shadowsocks-qt5/issues/20