Moderate earthquake shakes northern areas of Pakistan