Beaches in Long Island closed due to bacteria