phash: define options before dependencies
shadowsocks-libev: fix polarssl dependency
sdl: avoid repeated conditional