add missing standard library includes

I needed to add a few includes to make the code compile with GCC 4.9.0.