Foaming of synthetic and natural biodegradable polymers