Pakistan army 'kills 40 rebels'