Pirate attack on Norwegian ship foiled by NATO forces