Fixed possible compile error in CreateVector* functions.

Change-Id: I3b1fca2ea536349240b7bee35eff360f3acbb539
Tested: on Windows and Linux.