New York lawmakers agree to legalise recreational marijuana