West Ham have announced the signing of defender Roger Johnson from Wolves for the remainder of the season.