Merge pull request #13 from sideeffects/send_upstream

Fix warnings and support C++11
Fix C++11 detection for gcc <= 4.6