Debt-stricken Danish tanker operator Torm has posted its first quarterly net profit in five years thanks to higher freight rates.