Pakistani police say a bomb has exploded outside a Shi'ite mosque in the country 's northwest , killing at least four people .