Make Stream class useable inside foreach statement
Make this work with PHP 5.4