Allow preventing beforeseek event, fixes #378