fixed compile problem in 3.5 and silverlight