21 militants killed in NW Pakistan offensive