New and improved tests for #5435. Linux only at the moment.

Added a new test Makefile variable $(dllext), which is
instantiated to .dll or .so or .dylib depending on your platform.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>