Socket and ServerSocket don't implement Closeable in Java 1.5

This is a quick patch for Java 1.5 compatibility. No functional changes.