Flux in ocean levels drove mass extinctions: study