AF_* constants are only available with the sockets extension

Skip test if the extension is not available