refactored Unmarshal using unmarshalValue which returns reflect.Value

this change is needed for API, when the slice to be filled is created
using reflect.MakeSlice().