configure: check whether the compiler supports the malloc attribute

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>