Revert "Revert "Fix warnings on gcc 4.4""

This reverts commit d28b0d07fc6a472587d6fb9e1515b4d1c241f45e.
Fix compilation problems with clang

Apparently, clang presents itself as gcc 4.2 even though it supports the final version of rvalue references. Restrict the workaround to gcc only.
Avoid potential conflict between AIX's and Lambda's var.

In ../boost/lambda/detail/lambda_functor_base.hpp there is variable called var that conflicts with an AIX system variable. The entire file (sched.h) does not need to be included only the one function it uses (sched_yield).