fixing warning 4996 on visual studio compiler