Nokia swung to a net profit during the fourth quarter, as it sold a growing number of Windows Phone-based smartphones.