W.P. Carey buys Mass. office for $26.5M