Corrected the overloading of << and >> by making sure the second parameter is implicitly convertible to int.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>