use compatible_close for sockets

Signed-off-by: Andy Green <andy.green@linaro.org>