[Olena-patches] 1006: Add naive median to milena + fix problems with g++-2.95.