Egypt mosque horror 'will work against extremists'